﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data.Common;
using System.Data.OracleClient;
using System.Data;


namespace 工厂模式
{
    public abstract class CommandFactory
    {
        DbCommand command = null;
        public DataTable GetDataTable(string strSql, params SqlParameter[] parms)
        {
            DataTable dt = new DataTable();
            if (command != null)
            {
                command.CommandText = strSql;
                command.Parameters.AddRange(parms);
                
            }
            return dt;
        }
        public abstract DbCommand Create(DbConnection conn, string strType);
    }
}